package com.study.hutool.excel;

import cn.hutool.core.io.FileUtil;
import com.study.utils.ImgUtils;
import org.junit.jupiter.api.Test;

import java.io.File;
import java.io.IOException;

/**
 * @author zhuzi
 * 2023/10/26 12:23
 */
public class BaseFile {

    @Test
    public void fileBase() throws IOException {

        String path="/Users/zhuzi/Desktop/WechatIMG1013.jpg";

        String image2Base64 = ImgUtils.Image2Base64(path);

        System.out.println("data:image/png;base64,"+image2Base64);
        FileUtil.writeString("data:image/png;base64,"+image2Base64,new File("1111.TXT"),"UTF-8");


    }
}
